
export default {
    extends: ['@commitlint/config-conventional'],
    rules: {
        'body-leading-blank': [2, 'always'],
        'footer-leading-blank': [1, 'always'],
        'header-max-length': [2, 'always', 108],
        "subject-empty": [2, 'never'],
        "type-empty": [2, 'never'],
        "subject-case": [0],
        'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'style', 'refactor', 'test', 'chore']],
    },
    prompt: {
        types: [
            {
                value: 'feat',
                name: 'feat:     新功能'
            },
            {
                value: 'fix',
                name: 'fix:      修复'
            },
            {
                value: 'docs',
                name: 'docs:     文档变更'
            },
            {
                value: 'style',
                name: 'style:    代码格式（不影响功能，例如空格、分号等）'
            },
            {
                value: 'refactor',
                name: 'refactor: 代码重构（不包括修复错误）'
            },
            {
                value: 'test',
                name: 'test:     增加测试'
            },
            {
                value: 'chore',
                name: 'chore:    构建过程或辅助工具的变动'
            }
        ],
        scopes: ['root', 'frontend', 'backend', 'components', 'utils'],
        allowCustomScopes: true,
        skipQuestions: [
            'body',
            'footerPrefix',
            'footer',
            'breaking'
        ],
        messages: {
            type: '请输入提交类型',
            scope: '请输入提交范围',
            subject: '请输入提交描述',
            body: '请输入提交内容',
            footer: '请输入提交备注',
            confirmCommit: '确认提交？'
        }
    },
}